From fbed278604f69ea801dcea2d05df9ace1156a55d Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 27 Aug 2009 10:13:13 +0100 Subject: [PATCH] x86: fix msi_free_irq(). 1) We should invoke destroy_irq() before msix_put_fixmap(). 2) destroy_irq() invokes mask_msi_irq() eventually, so we can remove the duplicate mask operation in the 'if' statement here. Signed-off-by: Dexuan Cui --- xen/arch/x86/msi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index 5125ba1cbe..6dd2027c90 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -443,17 +443,14 @@ int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int irq) int msi_free_irq(struct msi_desc *entry) { + destroy_irq(entry->irq); if ( entry->msi_attrib.type == PCI_CAP_ID_MSIX ) { unsigned long start; - - writel(1, entry->mask_base + PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET); - start = (unsigned long)entry->mask_base & ~(PAGE_SIZE - 1); msix_put_fixmap(entry->dev, virt_to_fix(start)); } list_del(&entry->list); - destroy_irq(entry->irq); xfree(entry); return 0; } -- 2.30.2